<?php
	// if(isset($_COOKIE['name']))
	// {
			
	// }
	// else
	// {
	// 		echo '<h3>您是非法登陆哟！</h3>';
	// 		header("Refresh:1;login.html");
	// 		exit;
	// }
	include('sys.fun.php');
	// $servername = "localhost";
	// $username = "root";
	// $password = "";
	// $dbname = "dyd";
	 
	// // 创建连接
	// $conn = new mysqli($servername, $username, $password,$dbname);
	 
	// 检测连接
	// if ($conn->connect_error) 
	// {
	//     die("连接失败: " . $conn->connect_error);
	// } 
	
	// $sql = "select * from a_notepad";
	$lianjie = new MySQLonLife();
	$result = $lianjie->MySQL_go("localhost","root","","dyd","select * from a_notepad");
	//echo gettype($result);
	$num = $result->num_rows;
	if($result->num_rows > 0) 
	{
		//数据
		while ($row = $result->fetch_assoc())
		{
			$id[] = $row['note_id'];
			$content[] = $row['note_content'];
			$writer[] = $row['note_writer'];
			$time[] = $row['note_time'];
		}
		$return = true;
	}
	else
	{
		$return = false;
	}
?>